package com.lancer.anglsrv.util;

import java.util.Enumeration;
import java.util.Iterator;

public class IterableEnumeration<T> implements Iterable<T>, Iterator<T> {
	private Enumeration<T> enumeration;

	public IterableEnumeration(Enumeration<T> enumeration) {
		this.enumeration = enumeration;
	}

	public Iterator<T> iterator() {
		return this;
	}

	public boolean hasNext() {
		return enumeration.hasMoreElements();
	}

	public T next() {
		return enumeration.nextElement();
	}

	public void remove() {
		throw new UnsupportedOperationException();
	}
 }